#include "stdafx.h"

#include "BaseInc.h"
#include "base_stream.h"

#include "truetype_head.h"
#include "truetype_maxp.h"
#include "truetype_name.h"
#include "truetype_os2.h"
#include "truetype_hhea.h"
#include "truetype_hmtx.h"
#include "truetype_cmap.h"
#include "truetype_loca.h"
#include "truetype_glyf.h"

TYPE_API void * truetype_malloc(uint_x size);
TYPE_API void truetype_free(void * ptr);

TYPE_API uint_32 truetype_read_tables(base_stream_t * stream, tt_table_t * tables, uint_32 max_count);
TYPE_API bool truetype_create(truetype_t * tt);
TYPE_API void truetype_destroy(truetype_t * tt);

TYPE_API void truetype_raster(truetype_t * tt, int_32 char_index);
TYPE_API void truetype_get_glyf(truetype_t * tt, int_32 char_index, tt_glyf_t * glyf);
TYPE_API void truetype_raster_glyf(truetype_t * tt, tt_glyf_t * glyf);

uint_16 confirm_big_word(uint_16 val);
int_16 confirm_big_short(int_16 val);
uint_32 confirm_big_dword(uint_32 val);
int_32 confirm_big_int(int_32 val);
